import request from '@/utils/request'

// 查询邀请人列表
export function referrerList(params) {
    return request({
        url: '/merchant/referrer/list',
        method: 'get',
        params
    })
}
// 新增邀请人
export function addReferrer(data) {
    return request({
        url: '/merchant/referrer/add',
        method: 'post',
        data
    })
}
// 查询邀请人详情
export function referrerDetail(id) {
    return request({
        url: `/merchant/referrer/detail/${id}`,
        method: 'get',
    })
}
// 更新邀请人
export function editReferrer(data) {
    return request({
        url: '/merchant/referrer/edit',
        method: 'post',
        data
    })
}

// 下载邀请人二维码
export function referrerDownQrcode(id) {
    return request({
        url: `/merchant/referrer/down/qrcode/${id}`,
        method: 'get',
    })
}

// 下载获取渠道码
export function referrerDownChannel(id) {
    return request({
        url: `/merchant/referrer/down/channel/${id}`,
        method: 'get',
    })
}